#ifndef _POLYGON_H
#define _POLYGON_H
#include <stdio.h>
#include "GRAFIKA.H"
#include "CLIP.H"

typedef struct {
	int x;
	int y;
	int pen;
} Point;
typedef struct{
	Point* vertices;
	int vertexCount;
	int width;
	int height;
} Polygon;

boolean loadPolygon(const char* fileName, Polygon* polygon);
void freePolygon(Polygon* polygon);
void drawPolygon(Polygon polygon, int posX, int posY, byte color);
void drawClippedScreenPolygon(Polygon polygon, int posX, int posY, byte color, Region clipPlane);
void drawClippedPolygon(Polygon polygon, int posX, int posY, byte color, Region clipPlane, Region viewPort);
#endif
